﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRMimic
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApExportToRTRMimic : ICApExportToRTRWriteable
{
  public string m_joint;
  public double m_multiplier;
  public double m_offset;

  public CApExportToRTRMimic(string joint, double multiplier = 0.0, double offset = 0.0)
  {
    this.m_joint = joint;
    this.m_multiplier = multiplier;
    this.m_offset = offset;
  }

  public void Write(CApExportToRTRXmlWriter writer)
  {
    if (this.m_multiplier == 1.0 && this.m_offset == 0.0)
      return;
    writer.WriteStartElement("mimic");
    writer.WriteAttributeString("joint", this.m_joint);
    if (this.m_multiplier != 1.0)
      writer.WriteAttributeString("multiplier", this.m_multiplier.ToString() ?? "");
    if (this.m_offset != 0.0)
      writer.WriteAttributeString("offset", this.m_offset.ToString() ?? "");
    writer.WriteEndElement();
  }
}
